#region Copyright
/**
 *  This file is part of the Onix Solutions .NET FIX Engine Code Samples.
 *  
 *   Copyright (C) 2005-2012 Onix Solutions [OnixS].  All rights reserved.
 *  
 * This source code is intended only as a supplement to Onix Solutions
 * .NET FIX Engine and/or documentation. See these other materials 
 * for detailed information regarding Onix Solutions code samples.
 *  
 * THIS CODE AND INFORMATION ARE PROVIDED AS IS WITHOUT WARRANTY OF ANY
 * KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
 * PARTICULAR PURPOSE.
 */
#endregion

using System.Configuration;
using FIXForge.NET.FIX;

namespace OMS
{
    /// <summary>
    /// Configuration of the FIX Session.
    /// </summary>    
    public class SessionConfiguration : ConfigurationSection
    {
        [ConfigurationProperty("host", IsRequired = true)]
        public string Host
        {
            get { return (string)this["host"]; }
            set { this["host"] = value; }
        }
        
        [ConfigurationProperty("port", IsRequired = true)]        
        public int Port
        {
            get { return (int)this["port"]; }
            set { this["port"] = value; }
        }

        [ConfigurationProperty("senderCompID", IsRequired = true)]
        public string SenderCompID
        {
            get { return (string)this["senderCompID"]; }
            set { this["senderCompID"] = value; }
        }

        [ConfigurationProperty("targetCompID", IsRequired = true)]
        public string TargetCompID
        {
            get { return (string)this["targetCompID"]; }
            set { this["targetCompID"] = value; }
        }

        [ConfigurationProperty("fixVersion", IsRequired = true)]
        public ProtocolVersion Version
        {
            get
            {
                return (ProtocolVersion)this["fixVersion"];
            }
            set { this["fixVersion"] = value; }
        }

        [ConfigurationProperty("heartbeatInterval", IsRequired = true)]
        
        public int HeartbeatInterval
        {
            get { return (int)this["heartbeatInterval"]; }
            set { this["heartbeatInterval"] = value; }
        }

        [ConfigurationProperty("keepSequenceNumbersAfterLogout", IsRequired = true)]        
        public bool KeepSequenceNumbersAfterLogout
        {
            get { return (bool)this["keepSequenceNumbersAfterLogout"]; }
            set { this["keepSequenceNumbersAfterLogout"] = value; }
        }

        [ConfigurationProperty("setResetSeqNumFlag")]
        public bool SetResetSeqNumFlag
        {
            get { return (bool)this["setResetSeqNumFlag"]; }
            set { this["setResetSeqNumFlag"] = value; }
        }

        [ConfigurationProperty("username")]
        public string Username
        {
            get { return (string)this["username"]; }
            set { this["username"] = value; }
        }

        [ConfigurationProperty("password")]
        public string Password
        {
            get { return (string)this["password"]; }
            set { this["password"] = value; }
        }

        [ConfigurationProperty("rawData")]
        public string RawData
        {
            get { return (string)this["rawData"]; }
            set { this["rawData"] = value; }
        }

		[ConfigurationProperty("senderSubID")]
		public string SenderSubID
		{
			get { return (string)this["senderSubID"]; }
			set { this["senderSubID"] = value; }
		}

		[ConfigurationProperty("senderLocationID")]
		public string SenderLocationID
		{
			get { return (string)this["senderLocationID"]; }
			set { this["senderLocationID"] = value; }
		}

		[ConfigurationProperty("targetSubID")]
		public string TargetSubID
		{
			get { return (string)this["targetSubID"]; }
			set { this["targetSubID"] = value; }
		}

		[ConfigurationProperty("clientID")]
		public string ClientID
		{
			get { return (string)this["clientID"]; }
			set { this["clientID"] = value; }
		}

		[ConfigurationProperty("targetLocationID")]
		public string TargetLocationID
		{
			get { return (string)this["targetLocationID"]; }
			set { this["targetLocationID"] = value; }
		}

		[ConfigurationProperty("useSslEncryption")]
		public bool UseSslEncryption
		{
			get { return (bool)this["useSslEncryption"]; }
			set { this["useSslEncryption"] = value; }
		}

		[ConfigurationProperty("sslCertificateFile")]
		public string SslCertificateFile
		{
			get { return (string)this["sslCertificateFile"]; }
			set { this["sslCertificateFile"] = value; }
		}

		[ConfigurationProperty("account")]
		public string Account
		{
			get { return (string)this["account"]; }
			set { this["account"] = value; }
		}                                                                              

    }
}
